<html>
<head><meta charset="utf-8"><title>Difficult repros · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html">Difficult repros</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="228612668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Difficult%20repros/near/228612668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Brennan Vincent <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html#228612668">(Mar 03 2021 at 15:39)</a>:</h4>
<p>Hi all, a bit of a meta-question.</p>
<p>If I have a big mess of heavily generic code for which rust-analyzer isn't correctly inferring types, it is acceptable to create a GitHub issue whose repro instructions are basically just "go download this big mess of code from here" ?</p>
<p>I've done this a few times already, but I'm not sure if it's annoying to the team to get things that aren't minimal repros.</p>



<a name="228612790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Difficult%20repros/near/228612790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html#228612790">(Mar 03 2021 at 15:39)</a>:</h4>
<p>well, it's going to make it more likely that your bug will get looked at if you have a small repro, but any actual repro is already helpful ;)</p>



<a name="228613069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Difficult%20repros/near/228613069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Brennan Vincent <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html#228613069">(Mar 03 2021 at 15:41)</a>:</h4>
<p>The biggest risk is that someone from the r-a team spends time figuring out what is going wrong, and then determines it is a dupe of a known issue</p>



<a name="228613124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Difficult%20repros/near/228613124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html#228613124">(Mar 03 2021 at 15:41)</a>:</h4>
<p>it can be really helpful to try to minimize the repro though, you can often remove large swathes of dependencies and code. keep in mind that the repro doesn't need to _work_. you can remove lots of code and replace most function bodies by <code>loop {}</code></p>



<a name="228613201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Difficult%20repros/near/228613201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Brennan Vincent <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html#228613201">(Mar 03 2021 at 15:41)</a>:</h4>
<p>That is a good point.</p>



<a name="228613393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Difficult%20repros/near/228613393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html#228613393">(Mar 03 2021 at 15:42)</a>:</h4>
<p>Commenting out deps in Cargo.toml and module declarations is also a good start</p>



<a name="228613503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Difficult%20repros/near/228613503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html#228613503">(Mar 03 2021 at 15:43)</a>:</h4>
<p>but you could also post your big repro first, maybe I or someone else will immediately recognize it as a known problem. If it's involving lots of traits etc. that's unlikely though</p>



<a name="228663648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Difficult%20repros/near/228663648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html#228663648">(Mar 03 2021 at 20:37)</a>:</h4>
<p>I wonder if we could create an LSP record/replay feature</p>



<a name="228665819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Difficult%20repros/near/228665819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html#228665819">(Mar 03 2021 at 20:51)</a>:</h4>
<p>We can already log the LSP messages and we could presumably replay them to a new server instance.</p>



<a name="228667757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Difficult%20repros/near/228667757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Brennan Vincent <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Difficult.20repros.html#228667757">(Mar 03 2021 at 21:03)</a>:</h4>
<p>This question became irrelevant in this case, since I was indeed able to come up with a simple repro: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7864">https://github.com/rust-analyzer/rust-analyzer/issues/7864</a></p>
<p>But it is good to know the expectation for the future :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>